# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-libvirt
_pkgname=libvirt-python
pkgver=8.5.0
pkgrel=0
pkgdesc="The libvirt virtualization API python binding"
url="http://libvirt.org"
# s390x and riscv64 blocked by polkit -> libvirt
arch="all !s390x !riscv64"
license="LGPL-2.0-or-later"
makedepends="py3-setuptools python3-dev libvirt-dev libvirt"
checkdepends="py3-pytest py3-lxml"
source="https://libvirt.org/sources/python/$_pkgname-$pkgver.tar.gz
	disable-screenshot-test.patch"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-libvirt" # Backwards compatibility
provides="py-libvirt=$pkgver" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
0e922301243200229c01659e57b4abad69a85931ea3ffcb70b117f313971d266d036dc6c1dbe42d48380d5ad9ed72326603101eb33d6a68dd6b7253a6e197aff  libvirt-python-8.5.0.tar.gz
3d1d62a5d5283e5679dd1318a335b2785c895499f1fedae5d75947e29b0a55f6e4925108cf74e6b36f1c9f140aaf5c89171b84d8e94b1c3d3fc6fdc8c7f2f5fc  disable-screenshot-test.patch
"
